home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / examples / chap03 / Println.java < prev    next >
Text File  |  1996-09-05  |  378b  |  17 lines

  1. import vrml.*;
  2. import vrml.field.*;
  3. import vrml.node.*;
  4.  
  5. public class Println extends Script{
  6.  
  7. private SFString sceneEnt;
  8.  
  9.  
  10.   public void processEvent(Event e) {
  11.     ConstSFBool v = (ConstSFBool)e.getValue();
  12.     if(v.getValue()){
  13.       sceneEnt = (SFString) getField("sceneEnt");
  14.       System.out.println("You've clicked a " + sceneEnt.getValue());
  15.     }
  16.   }
  17. }